﻿@model S4Store.Models.Sellers.ListPage
@{
    ViewBag.Title = "Index";
    Layout = null;
    S4Store.Domain.Administrator CurrentUser = (S4Store.Domain.Administrator)ViewBag.CurrentUser;
    var h = "#65";
    if (
                           CurrentUser.Position == S4Store.Domain.Position.GeneralManager ||
                           CurrentUser.Position == S4Store.Domain.Position.SystemManager
                           )
    {
        h = "#95";
    }
    }
<div class="listpage verticalSplitContainer" style="height:100%;">
    <form method="post" action="@Url.Action("Query")"  ratio="@h">
    <div class="querybar">
        <table class="querytable">
            <tbody>
            
            <tr>
                       <td>
                           <div class="queryitem">
                               <span class="querytitle">姓名：</span>
                               <input type="text" name="Name" class="textInput" />
                           </div>
                       </td>
                       <td>
                           <div class="queryitem">
                               <span class="querytitle">工作岗位：</span>
                               <select name="EmployeeType">
                                <option value="">全部</option>
                               @{var list = LX.Core.Utils.Helper.EnumToList<S4Store.Domain.EmployeeType>();}
                               @foreach (var item in list)
                               {
                                <option value="@item.ToInt()">@item.GetDescription()</option>
                               }
                               </select>
                           </div>
                       </td>
                       <td>
                           <div class="queryitem">
                               <span class="querytitle">在职状态：</span>
                               <select name="Status">
                                <option value="">全部</option>
                               @{var list1 = LX.Core.Utils.Helper.EnumToList<S4Store.Domain.Status>();}
                               @foreach (var item in list1)
                               {
                                <option value="@item.ToInt()">@item.GetDescription()</option>
                               }
                               </select>
                           </div>
                       </td>
            </tr>
            
                       @if (
                           CurrentUser.Position == S4Store.Domain.Position.GeneralManager ||
                           CurrentUser.Position == S4Store.Domain.Position.SystemManager
                           )
                       {
                           <tr>
                       <td>
                           <div class="queryitem">
                               <span class="querytitle">所属店：</span>
                               <select name="Store" class="">
                                   <option value="">所有店</option>
                                   @foreach (var store in Model.Stores)
                                   {
                                       <option value="@store.Id">@store.Name</option>
                                   }
                               </select>
                           </div>
                       </td>
                       <td>
                           <div class="queryitem">
                               <span class="querytitle">品牌：</span> @Html.Action("Select", "Pinpai")
                           </div>
                       </td>
                       <td>
                           <div class="queryitem">
                               <span class="querytitle">经销商代码：</span> <input type="text" name="StoreCode" class="textInput" />
                           </div>
                       
                       </td>
                       
                   </tr>
                       }
            </tbody></table>
        <div class="querybuttonbar">
            <div class="simplebutton"><div class="r"><button type="button" class="submit">检索</button></div></div>
        </div>
        <div class="clear"></div>
    </div>
    </form>
@if (CurrentUser.Position == S4Store.Domain.Position.DataEntryClerk || CurrentUser.Position == S4Store.Domain.Position.StoreManager || CurrentUser.Position == S4Store.Domain.Position.SystemManager)
{
    <div class="panelBar"  ratio="#25">
        <ul class="toolBar">
                <li class=""><a target="dialog" href="@Url.Action("Add")" backtype="html" refreshonclose="true"><span class="icon add">添加职员</span></a></li>
                <li class=""><a target="dialog" href="@Url.Action("Modify")" backtype="html" refreshonclose="true" beforechk="link.onlySelectOne()"  postdata="{id:link.getSelectid()}"><span class="icon edit">修改职员信息</span></a></li>
        </ul>
    </div>
}
<div  ratio="*" class="verticalSplitContainer dataRefresh">
@Html.Action("Query")
</div>
</div>